package com.neu.yishu.controller;

import com.neu.yishu.model.BookInfo;
import com.neu.yishu.service.BookInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class BookInfoController {
    @Autowired
    BookInfoService bookInfoService;

    @GetMapping("/book")
    public Object selectAll() {
        return bookInfoService.selectAll();
    }

    @PostMapping("/bookSignUp")
    public void signUp(@RequestBody BookInfo bookInfo) {
        System.out.println(bookInfo);
    }
}
